<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>TP2-Partie1Dictionnaire:  Fichier source de Dictionnaire.cpp</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">TP2-Partie1Dictionnaire
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Généré par Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Page&#160;principale</span></a></li>
      <li><a href="namespaces.html"><span>Espaces&#160;de&#160;nommage</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Fichiers</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Liste&#160;des&#160;fichiers</span></a></li>
      <li><a href="globals.html"><span>Membres&#160;de&#160;fichier</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_dictionnaire_8cpp_source.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Dictionnaire.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_dictionnaire_8cpp.html">Aller à la documentation de ce fichier.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_dictionnaire_8h.html">Dictionnaire.h</a>&quot;</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include&lt;cmath&gt;</span> <span class="comment">// pour la fonction abs (valeur absolue)</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include&lt;algorithm&gt;</span> <span class="comment">// pour la fonction max et find, et sort</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#include&lt;iostream&gt;</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">using namespace </span>std;</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div>
<div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="namespace_t_p2_p1.html">   17</a></span>&#160;<span class="keyword">namespace </span>TP2P1</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;{</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;</div>
<div class="line"><a name="l00023"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a1fac45a536b034e0f9c18600159bfae4">   23</a></span>&#160;    Dictionnaire::Dictionnaire()</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    :racine(0), cpt(0) {}</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a1fac45a536b034e0f9c18600159bfae4">Dictionnaire::Dictionnaire</a>(ifstream&amp; fichier)</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    :racine(0), cpt(0)</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;        <span class="keywordtype">string</span> ligne;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;        <span class="keywordtype">string</span> motOriginal, motTraduit;</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;        string::iterator posT;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;        string::iterator posD;</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;        string::iterator it;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;        string::iterator tabulation; <span class="comment">// sera placÃ© sur la tabulation aprÃ¨s le mot en anglais</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        <span class="keywordtype">bool</span> contexte;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;        <span class="comment">// tant qu&#39;on atteint pas la fin du fichier</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        <span class="keywordflow">while</span>(!fichier.eof())</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;        {</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;            getline(fichier, ligne);</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;            <span class="comment">// lignes d&#39;en-tÃªte</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;            <span class="keywordflow">if</span>(ligne[0] == <span class="charliteral">&#39;#&#39;</span>)</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;                <span class="keywordflow">continue</span>;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;            <span class="comment">// on va chercher le mot original</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;            tabulation = find(ligne.begin(), ligne.end(), <span class="charliteral">&#39;\t&#39;</span>);</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;            <span class="keywordtype">string</span> motOriginal(ligne.begin(), tabulation);</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;            <span class="comment">// on va chercher la position du ~ s&#39;il y en a un</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;            posT = find(ligne.begin(), ligne.end(), <span class="charliteral">&#39;~&#39;</span>);</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;            <span class="comment">// on va chercher la position du ~ s&#39;il y en a un</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            posD = find(ligne.begin(), ligne.end(), <span class="charliteral">&#39;:&#39;</span>);</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;            <span class="comment">// vÃ©rifier s&#39;il y a un contexte entre parenthÃ¨ses</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;            contexte = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;            it = tabulation + 1;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;            <span class="keywordflow">if</span>(*it == <span class="charliteral">&#39;(&#39;</span>)</div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;                contexte = <span class="keyword">true</span>;</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;            <span class="comment">// passer le contexte s&#39;il y a lieu</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;            <span class="keywordflow">if</span>(contexte == <span class="keyword">true</span>)</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;            {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;                it = find(it, ligne.end(), <span class="charliteral">&#39;)&#39;</span>);</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;                <span class="comment">// pour que l&#39;itÃ©rateur it soit sur le premier caractÃ¨re aprÃ¨s la parenthÃ¨se</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;                it++;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="comment">// Traiter les cas comme celui-ci :</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;            <span class="comment">// a    un(e): ~ book = un livre. 2.(instead of number one) ~ year ago; il y a un an[Article]</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            <span class="keywordflow">if</span>(posD &lt; posT)</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;                string::iterator temp = find(it, ligne.end(), <span class="charliteral">&#39;:&#39;</span>);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;                motTraduit = string(it, temp);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            }</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;            {</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;                <span class="comment">// Traiter les cas comme celui-ci :</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;                <span class="comment">// abode    of no fixed ~ :sans domicile fixe[Noun]</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;                <span class="keywordflow">if</span>(posT &lt; posD &amp;&amp; posT != ligne.end() &amp;&amp; posD != ligne.end())</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;                    it = find(it, ligne.end(), <span class="charliteral">&#39;:&#39;</span>);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;                    it++; <span class="comment">// pour qu&#39;il pointe sur le premier caractÃ¨re du mot traduit</span></div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;                }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;                <span class="comment">//les deux lignes suivantes Ã©taient commentÃ©es... j&#39;ai enlevÃ© les commentaires et tout semble marcher, mais c&#39;est Ã  vÃ©rifier (SIMON)</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                string::iterator temp = find_if(it, ligne.end(), <a class="code" href="namespace_t_p2_p1.html#a5d43fdfa11a86d28cc7806df9338cb1b">charSpecial</a>);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;                motTraduit = string(it, temp);</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;            }</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;            <span class="keywordflow">try</span> {</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2fe841290d727a217fb884825bb736b7">ajouteMot</a>(motOriginal, motTraduit);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;            }</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;            <span class="keywordflow">catch</span> (bad_alloc&amp; e)</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;            {</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">_detruire</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>);</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;                <span class="keywordflow">throw</span>;</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;            }</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        }</div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;    }</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#ab8f2a691b729b54115cd40256aa2ec00">  109</a></span>&#160;    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ab8f2a691b729b54115cd40256aa2ec00">Dictionnaire::~Dictionnaire</a>()</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    {</div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">_detruire</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>);</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    }</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00121"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a2fe841290d727a217fb884825bb736b7">  121</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2fe841290d727a217fb884825bb736b7">Dictionnaire::ajouteMot</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; motOriginal, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; motTraduit)</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    {</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a> == 0)</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;        {</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a> = <span class="keyword">new</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">NoeudDictionnaire</a>(motOriginal);</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a>.push_back(motTraduit);</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>++;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;        }</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">_auxAjouteMot</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>, motOriginal, motTraduit);</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">_balancer</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>); <span class="comment">// pour garder l&#39;arbre balancÃ© Ã  chaque insertion</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    }</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#addc784e06d941ed8ab530da2b02e72fe">  139</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#addc784e06d941ed8ab530da2b02e72fe">Dictionnaire::supprimeMot</a>(<span class="keyword">const</span> <span class="keywordtype">string</span>&amp; motOriginal)</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    {</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a> == 0)</div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;            <span class="keywordflow">throw</span> logic_error(<span class="stringliteral">&quot;supprimeMot: Le dictionnaire est vide!&quot;</span>);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;</div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;        <span class="keywordflow">if</span>(!<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">_auxSupprimeMot</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>, motOriginal))</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;            <span class="keywordflow">throw</span> logic_error(<span class="stringliteral">&quot;supprimeMot: le mot &quot;</span> + motOriginal + <span class="stringliteral">&quot; n&#39;est pas prÃ©sent dans le dictionnaire.&quot;</span>);</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">_ajusterHauteur</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>);</div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">_balancer</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    }</div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div>
<div class="line"><a name="l00158"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#acc8506e31ea041e6b5de77cb9c2efec8">  158</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#acc8506e31ea041e6b5de77cb9c2efec8">Dictionnaire::appartient</a>(<span class="keyword">const</span> <span class="keywordtype">string</span> &amp; mot)</div>
<div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;    {</div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">_auxAppartient</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>, mot);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    }</div>
<div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div>
<div class="line"><a name="l00167"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#afec31f16e68dbf1d5b690a0f4a8fc76c">  167</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#afec31f16e68dbf1d5b690a0f4a8fc76c">Dictionnaire::estVide</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a> == 0;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    }</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a8581528413efd6d84ce02664d628958a">  175</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a8581528413efd6d84ce02664d628958a">Dictionnaire::afficherSymetrique</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">_auxAfficherSymetrique</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    }</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div>
<div class="line"><a name="l00185"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a4cd52bdf5bfaaea2eb7c814bd96ba8c8">  185</a></span>&#160;    <span class="keywordtype">double</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a4cd52bdf5bfaaea2eb7c814bd96ba8c8">Dictionnaire::similitude</a>(<span class="keyword">const</span> std ::string&amp; mot1, <span class="keyword">const</span> std ::string&amp; mot2)</div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    {</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="comment">//on commence avec similaritÃ© parfaite SIMILAR = 1</span></div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordtype">double</span> similar = 1;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="comment">//CAS PARTICULIER: deux mots d&#39;une lettre oÃ¹ la lettre est diffÃ©rente</span></div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keywordflow">if</span> (mot1.size()==1 &amp;&amp; mot2.size()==1 &amp;&amp; mot1.at(0)!=mot2.at(0))</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;        {</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;            <span class="keywordflow">return</span> 0.25;</div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;        }</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;</div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        std::string motCourt, motLong;</div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <span class="comment">//on Ã©tablit quel mot est le plus court et quel est le plus long</span></div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;        <span class="keywordflow">if</span>(mot1.size()&lt;=mot2.size())</div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        {</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            motCourt = mot1;</div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            motLong = mot2;</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        }</div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        {</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;            motCourt = mot2;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;            motLong = mot1;</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;        }</div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="comment">//on boucle jusqu&#39;Ã  la fin du mot1 (pendant que (SIMILAR&gt;=0) ET qu&#39;il reste des lettres Ã  traiter dans Mot1)</span></div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;        <span class="keywordtype">int</span> distance = motCourt.size();     <span class="comment">//distance mesurera la distance entre une lettre recherchÃ© dans le deuxieme mot et la lettre dans le mot d&#39;origine</span></div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; (int)motCourt.size(); i++)</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        {</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            <span class="keywordtype">bool</span> trouvee = <span class="keyword">false</span>;   <span class="comment">//devient true si on trouve la lettre identique Ã  l&#39;indice i du motCourt dans motLong</span></div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            <span class="comment">//si la lettre de mot1 != la lettre du mot2</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            <span class="keywordflow">if</span>(motCourt.at(i)!=motLong.at(i))</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            {</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;                <span class="comment">//(on boucle Ã  l&#39;intÃ©rieur du mot2 pour voir si on peut trouver la lettre.)</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;                <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 1; j &lt; (int)motLong.size() ; j++)</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;                {</div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;                    <span class="comment">//si on la trouve,</span></div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;                    <span class="comment">//(rappel: on veux commencer avec les lettres les plus proches et s&#39;Ã©loigner jusqu&#39;Ã  temps qu&#39;on trouve la bonne lettre)</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;                    <span class="keywordflow">if</span>(i-j&gt;=0)</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;                    {</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;                        <span class="keywordflow">if</span> (motCourt.at(i)==motLong.at(i-j))</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;                        {</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;                            distance = j;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;                            trouvee=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;                            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;                        }</div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;                    }</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;                    <span class="keywordflow">else</span> <span class="keywordflow">if</span>(i+j&lt;(<span class="keywordtype">int</span>)motLong.size())</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;                    {</div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;                        <span class="keywordflow">if</span> (motCourt.at(i)==motLong.at(i+j))</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;                        {</div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                            distance = j;</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                            trouvee=<span class="keyword">true</span>;</div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                        }</div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                    }</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                }</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                <span class="keywordflow">if</span> (trouvee==<span class="keyword">true</span>)</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;                {</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;                    similar = (similar * (min (  abs((<span class="keywordtype">double</span>)distance-(<span class="keywordtype">double</span>)motCourt.size()) ,  (<span class="keywordtype">double</span>)motCourt.size()   )    ) / (double)motCourt.size());</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                }</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                {</div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                    similar = (similar - ( 1 /(double)motCourt.size() )) ;</div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                }</div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;            }</div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;            <span class="comment">//sinon, Ã§a veut dire que mot1.at(i)==mot2.at(i), et SIMILAR reste Ã©gal Ã  sa valeur.</span></div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;        }</div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;        <span class="comment">//on applique une penalitÃ© de 10% a SIMILAR pour chaque lettre de difference en longueur</span></div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;        <span class="keywordflow">if</span>(motLong.size()!=motCourt.size())</div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;            <span class="keywordtype">double</span> diff = (double)motLong.size()-(double)motCourt.size();</div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;            <span class="keywordflow">if</span> (diff&gt;=10)</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;            {</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                similar = 0;</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;            }</div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;            {</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;                similar = similar*(1.0 - (diff/10.0) );</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;            }</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        }</div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keywordflow">if</span>(similar &lt; 0)</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        {</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="comment">//SIMILAR = 0;</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;            similar = 0;</div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        }</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;</div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="comment">//retourner SIMILAR</span></div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;        <span class="keywordflow">return</span> similar;</div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    }</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div>
<div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a0912cee29c757ad7ea3456c7ea6d3a0e">  283</a></span>&#160;    std::vector&lt;std::string&gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a0912cee29c757ad7ea3456c7ea6d3a0e">Dictionnaire::traduit</a>(<span class="keyword">const</span> std ::string&amp; mot)</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    {</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;        std::vector&lt;std::string&gt; traduction;</div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>==NULL) <span class="keywordflow">return</span> traduction;</div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">_auxTraduit</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>, mot, traduction);</div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="keywordflow">return</span> traduction;</div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    }</div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div>
<div class="line"><a name="l00291"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">  291</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">Dictionnaire::_auxTraduit</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> courant, <span class="keyword">const</span> std::string&amp; mot, std::vector&lt;std::string&gt;&amp; traduction)</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    {</div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;        <span class="comment">//est-ce que le mot est identique au mot de l&#39;Ã©lÃ©ment courant</span></div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        <span class="keywordflow">if</span>(mot==courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a>)</div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;        {</div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;            <span class="comment">//si oui, on retourne immÃ©diatement le vecteur de ce noeud</span></div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;            traduction = courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a>;</div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;        }</div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="comment">//      else</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">//      {</span></div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;<span class="comment">//          if (courant-&gt;gauche!=NULL)          _auxTraduit(courant-&gt;gauche, mot, traduction);</span></div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;<span class="comment">//          if (courant-&gt;droite!=NULL)          _auxTraduit(courant-&gt;droite, mot, traduction);</span></div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;<span class="comment">//      }</span></div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="comment">//si le mot est plus petit que le mot du noeud courant</span></div>
<div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;        <span class="keywordflow">if</span>(mot&lt;courant-&gt;mot)</div>
<div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        {</div>
<div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="comment">//si le fils gauche n&#39;est pas NULL</span></div>
<div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;            <span class="keywordflow">if</span>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>!=NULL)</div>
<div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;            {</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                <span class="comment">//on vÃ©rifie le fils gauche</span></div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">_auxTraduit</a>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>, mot, traduction);</div>
<div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;            }</div>
<div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;</div>
<div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;        }</div>
<div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div>
<div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;        <span class="comment">//si le mot est plus grand que le mot du noeud courant</span></div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keywordflow">if</span>(mot&gt;courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a>)</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        {</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;            <span class="comment">//si le fils droit n&#39;est pas NULL</span></div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            <span class="keywordflow">if</span>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>!=NULL)</div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;            {</div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;                <span class="comment">//on vÃ©rifie le fils droit</span></div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">_auxTraduit</a>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>, mot, traduction);</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;            }</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        }</div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        <span class="comment">//si on se rend iÃ§i, le vecteur est inchangÃ©e et la fonction retourne</span></div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    }</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div>
<div class="line"><a name="l00337"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#aecfb98d1a69ab5a3adb9e6e649d46b9d">  337</a></span>&#160;    std::vector&lt;std::string&gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aecfb98d1a69ab5a3adb9e6e649d46b9d">Dictionnaire::suggereCorrections</a>(<span class="keyword">const</span> std ::string&amp; motMalEcrit)</div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    {</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#afec31f16e68dbf1d5b690a0f4a8fc76c">estVide</a>())</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        {</div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;            <span class="keywordflow">throw</span> logic_error(<span class="stringliteral">&quot;suggereCorrections: le dictionnaire est vide&quot;</span>);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        }</div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        std::vector&lt; std::pair&lt; std::string, double &gt; &gt; auxSuggestions;     <span class="comment">//un vecteur de couple: tient les Ã©lÃ©ments et leur similaritÃ©</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> courant = <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">racine</a>;</div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        <span class="keywordtype">double</span> minCourantSuggestions;</div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">_auxSuggereCorrections</a>(courant, auxSuggestions, motMalEcrit, minCourantSuggestions);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        std::vector&lt;std::string&gt; suggestions;</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        <span class="comment">//changer le vecteur de Pairs en vecteur de mots</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        suggestions = <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aeb93f0b68de19b7cc63f692525aa3210">_preparerSuggestions</a>(auxSuggestions);</div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <span class="keywordflow">return</span> suggestions;</div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    }</div>
<div class="line"><a name="l00361"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">  361</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">Dictionnaire::_auxSuggereCorrections</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> courant, std::vector&lt; std::pair&lt;std::string,double &gt; &gt;&amp; auxSuggestions, <span class="keyword">const</span> std ::string&amp; motMalEcrit,</div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;            <span class="keywordtype">double</span>&amp; minCourantSuggestions)</div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;    {</div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;</div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        <span class="keywordtype">double</span> similarite = <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a4cd52bdf5bfaaea2eb7c814bd96ba8c8">similitude</a>(motMalEcrit, courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a>);      <span class="comment">//la similaritÃ© du mot courant au motMalEcrit</span></div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        <span class="comment">//si la similarite est PLUS GRANDE que minCourantSuggestions,</span></div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        <span class="keywordflow">if</span>(similarite &gt; minCourantSuggestions || auxSuggestions.size() &lt; 10)</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        {</div>
<div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;            <span class="comment">//ajoute le mot courant au vecteur et s&#39;assurer qu&#39;Il ne reste que 10 mots max dans le vecteur</span></div>
<div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6de74fa6b41e3895e24a2c152a14ddb9">_auxAjoutSuggestion</a>(auxSuggestions, courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a>, similarite, minCourantSuggestions);</div>
<div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        }</div>
<div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;</div>
<div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        <span class="comment">//visiter le fils de gauche s&#39;il n&#39;est pas vide</span></div>
<div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;        <span class="keywordflow">if</span>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> != NULL)</div>
<div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;        {</div>
<div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">_auxSuggereCorrections</a>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>, auxSuggestions, motMalEcrit, minCourantSuggestions);</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        }</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;        <span class="comment">//visiter le fils de droite s&#39;Il n&#39;est pas vide</span></div>
<div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;        <span class="keywordflow">if</span>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> != NULL)</div>
<div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;        {</div>
<div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">_auxSuggereCorrections</a>(courant-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>, auxSuggestions, motMalEcrit, minCourantSuggestions);</div>
<div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;        }</div>
<div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    }</div>
<div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;</div>
<div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a6de74fa6b41e3895e24a2c152a14ddb9">  395</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6de74fa6b41e3895e24a2c152a14ddb9">Dictionnaire::_auxAjoutSuggestion</a>(std::vector&lt; std::pair &lt; std::string, double &gt; &gt; &amp; auxSuggestions, std::string motAAjouter, <span class="keywordtype">double</span> similarite,</div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;             <span class="keywordtype">double</span>&amp; minCourantSuggestions)</div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    {</div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        std::pair&lt;std::string, double&gt; elementAAjouter(motAAjouter, similarite);</div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;        <span class="comment">//est-ce que l&#39;item a moins que 10 Ã©lÃ©ments?</span></div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        <span class="keywordflow">if</span> (auxSuggestions.size() &lt; 10)</div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        {</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;            <span class="comment">//si oui, ajouter l&#39;Ã©lÃ©ment</span></div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;            auxSuggestions.push_back(elementAAjouter);</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;            <span class="comment">//identifier le nouveau minimum</span></div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;            <span class="keywordtype">double</span> calculMinimum= 1.0;</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;            <span class="keywordflow">for</span>(std::vector&lt; std::pair&lt; std::string,double &gt; &gt;::iterator it = auxSuggestions.begin() ; it!=auxSuggestions.end(); it++ )</div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;            {</div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;                <span class="keywordflow">if</span> (calculMinimum &gt; it-&gt;second)</div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;                {</div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;                    calculMinimum = it-&gt;second;</div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;                }</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;            }</div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;            minCourantSuggestions = calculMinimum;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        }</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        {</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;            <span class="keywordtype">int</span> counter=0;</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;            <span class="comment">//trouver l&#39;Ã©lÃ©ment avec la similaritÃ© la plus basse du vecteur</span></div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;            <span class="keywordflow">for</span>(std::vector&lt;std::pair&lt;std::string,double &gt; &gt;::iterator it = auxSuggestions.begin() ; it!=auxSuggestions.end(); it++ )</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;            {</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;                <span class="comment">//si it-&gt;second = minimum courant,</span></div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;                <span class="keywordflow">if</span> (it-&gt;second == minCourantSuggestions)</div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;                {</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;                    <span class="comment">//l&#39;effacer</span></div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;                    auxSuggestions.erase (auxSuggestions.begin()+counter);</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;                    <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;                }</div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;                counter++;</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;            }</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;</div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;            <span class="comment">//ajouter le nouvel Ã©lÃ©ment au vecteur</span></div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;            auxSuggestions.push_back(elementAAjouter);</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;            <span class="comment">//trouver le nouveau minimum</span></div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;            <span class="keywordtype">double</span> calculMinimum= 1;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;            <span class="keywordflow">for</span>(std::vector&lt;std::pair&lt;std::string,double &gt; &gt;::iterator it = auxSuggestions.begin() ; it!=auxSuggestions.end(); it++ )</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;            {</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;                <span class="keywordflow">if</span> (calculMinimum &gt; it-&gt;second)</div>
<div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;                {</div>
<div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;                    calculMinimum = it-&gt;second;</div>
<div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;                }</div>
<div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;            }</div>
<div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;            minCourantSuggestions = calculMinimum;</div>
<div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;            <span class="comment">//return</span></div>
<div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;        }</div>
<div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;    }</div>
<div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;</div>
<div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#aeb93f0b68de19b7cc63f692525aa3210">  455</a></span>&#160;    std::vector&lt;std::string&gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aeb93f0b68de19b7cc63f692525aa3210">Dictionnaire::_preparerSuggestions</a>(std::vector&lt;std::pair&lt;std::string,double &gt; &gt;&amp; auxSuggestions)</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    {</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;        std::vector&lt;std::string&gt; suggestions;</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;        <span class="keywordflow">for</span>(std::vector&lt;std::pair&lt;std::string,double &gt; &gt;::iterator it = auxSuggestions.begin() ; it!=auxSuggestions.end(); it++ )</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;        {</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;            suggestions.push_back(it-&gt;first);</div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;        }</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        <span class="keywordflow">return</span> suggestions;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    }</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;</div>
<div class="line"><a name="l00472"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a65a771c9a6043f19629d07a0e21b22e7">  472</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a65a771c9a6043f19629d07a0e21b22e7">Dictionnaire::nombreDeMot</a>()<span class="keyword"> const</span></div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;    }</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;</div>
<div class="line"><a name="l00484"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">  484</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">Dictionnaire::_auxAjouteMot</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; motOriginal, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; motTraduit)</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    {</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;        <span class="keywordflow">if</span>(n == 0) <span class="comment">// le mot n&#39;est pas dans le dictionnaire, on ajoute un noeud</span></div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;        {</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;            n = <span class="keyword">new</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">NoeudDictionnaire</a>(motOriginal);</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a>.push_back(motTraduit);</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>++;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        }</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        <span class="comment">// le mot est dÃ©jÃ  dans le dicitonnaire, on ajoute une traduciton Ã  ce mot</span></div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> == motOriginal)</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        {</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;            n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a>.push_back(motTraduit);</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        }</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;        <span class="comment">// on fait un appel rÃ©cursif pour insÃ©rer le mot</span></div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;        {</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;            <span class="keywordflow">if</span>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> &gt; motOriginal)</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;            {</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">_auxAjouteMot</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>, motOriginal, motTraduit);</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;            }</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;            {</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">_auxAjouteMot</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>, motOriginal, motTraduit);</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;            }</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;            n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>), <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>));</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;        }</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;    }</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;</div>
<div class="line"><a name="l00522"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">  522</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">Dictionnaire::_auxSupprimeMot</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; mot)</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;    {</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;        <span class="keywordflow">if</span>(n == NULL)</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> &gt; mot)</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">_auxSupprimeMot</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>, mot);</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> &lt; mot)</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">_auxSupprimeMot</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>, mot);</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;        <span class="keywordflow">else</span> <span class="comment">// on a trouvÃ© le mot</span></div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;        {</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;            <span class="keywordflow">if</span>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> != 0 &amp;&amp; n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> != 0) <span class="comment">// si le noeud Ã  deux enfants</span></div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;            {</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> temp = <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa6bd888a66a1952a13839c08dfdae2a9">_noeudMinimum</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> = temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a>;</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;                n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a> = temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">traductions</a>;</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a99867cc01e1b86376552700aafa194a6">_retireMinimum</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;            }</div>
<div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;            <span class="keywordflow">else</span> <span class="comment">// le noeud Ã  aucun enfant ou un seul enfant</span></div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;            {</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> temp = n;</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;                n = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> == NULL ? n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> : n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>;</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;                <span class="keyword">delete</span> temp;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>--;</div>
<div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;                <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;            }</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;        }</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    }</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;</div>
<div class="line"><a name="l00558"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">  558</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">Dictionnaire::_hauteur</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    {</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;        <span class="keywordflow">return</span> n == 0 ? -1 : n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a>;</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    }</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;</div>
<div class="line"><a name="l00568"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">  568</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">Dictionnaire::_balancer</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;    {</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;        <span class="keywordflow">if</span>(n == NULL)</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">_balancer</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">_balancer</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;        <span class="keywordflow">if</span>(abs(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>) - <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>)) == 2) <span class="comment">// s&#39;il y a un dÃ©balancement</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;        {</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;            <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>) &gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>)) <span class="comment">// dÃ©balancement Ã  gauche</span></div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;            {</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> nGauche = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>;</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;                <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(nGauche-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>) &gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(nGauche-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>))</div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;                    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">_zigZigGauche</a>(n);</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;                    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a724750019b77473e549faf6bfd1f0e3c">_zigZagGauche</a>(n);</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;            }</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;            <span class="keywordflow">else</span> <span class="comment">// dÃ©balancement Ã  droite</span></div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;            {</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;                <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> nDroit = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>;</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;                <span class="keywordflow">if</span>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(nDroit-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>) &gt; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(nDroit-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>))</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;                    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">_zigZigDroit</a>(n);</div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;                    <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2da68fe1c700505208e4247285df570c">_zigZagDroit</a>(n);</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;            }</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;        }</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;    }</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;</div>
<div class="line"><a name="l00601"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">  601</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">Dictionnaire::_zigZigGauche</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    {</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> temp = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>;</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> = temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>;</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;        temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> = n;</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>), <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>));</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;        temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>), n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a>);</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        n = temp;</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;    }</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;</div>
<div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">  616</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">Dictionnaire::_zigZigDroit</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;    {</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> temp = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>;</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> = temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>;</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> = n;</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>), <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>));</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">_hauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>), n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a>);</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        n = temp;</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;    }</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;</div>
<div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a724750019b77473e549faf6bfd1f0e3c">  631</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a724750019b77473e549faf6bfd1f0e3c">Dictionnaire::_zigZagGauche</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;    {</div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">_zigZigDroit</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">_zigZigGauche</a>(n);</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;    }</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;</div>
<div class="line"><a name="l00642"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a2da68fe1c700505208e4247285df570c">  642</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2da68fe1c700505208e4247285df570c">Dictionnaire::_zigZagDroit</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;    {</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">_zigZigGauche</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">_zigZigDroit</a>(n);</div>
<div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;    }</div>
<div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;</div>
<div class="line"><a name="l00653"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">  653</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">Dictionnaire::_auxAfficherSymetrique</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> n)<span class="keyword"> const</span></div>
<div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;        <span class="keywordflow">if</span>(n == NULL)</div>
<div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">_auxAfficherSymetrique</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;        cout &lt;&lt; n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> &lt;&lt; <span class="stringliteral">&quot;  : Hauteur -&gt; &quot;</span> &lt;&lt; n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> &lt;&lt; endl;</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;<span class="comment">//      ici - AJOUT POUR TEST (SIMON)</span></div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;<span class="comment">//      vector&lt;string&gt; trad = n-&gt;traductions;</span></div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;<span class="comment">//      cout&lt;&lt;&quot;Traductions:&quot;&lt;&lt;endl;</span></div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;<span class="comment">//      for(vector&lt;string&gt;::iterator it = trad.begin(); it!=trad.end(); it++)</span></div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;<span class="comment">//      {</span></div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;<span class="comment">//          cout&lt;&lt;*it&lt;&lt;endl;</span></div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;<span class="comment">//      }</span></div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;<span class="comment">//      arret - AJOUT POUR TEST (SIMON)</span></div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">_auxAfficherSymetrique</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;    }</div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;</div>
<div class="line"><a name="l00677"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#aa6bd888a66a1952a13839c08dfdae2a9">  677</a></span>&#160;    <span class="keyword">typename</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">Dictionnaire::elem</a>&amp; <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa6bd888a66a1952a13839c08dfdae2a9">Dictionnaire::_noeudMinimum</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;    {</div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;        <span class="keywordflow">if</span>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> == NULL)</div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;            <span class="keywordflow">return</span> n;</div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa6bd888a66a1952a13839c08dfdae2a9">_noeudMinimum</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    }</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;</div>
<div class="line"><a name="l00690"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a99867cc01e1b86376552700aafa194a6">  690</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a99867cc01e1b86376552700aafa194a6">Dictionnaire::_retireMinimum</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;    {</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;        <span class="keywordflow">if</span>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> == NULL)</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;        {</div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a> temp = n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>;</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;            <span class="keywordflow">if</span>(temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> != 0)</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;                n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> = temp-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>;</div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;            <span class="keywordflow">else</span></div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;                n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> = NULL;</div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;            <span class="keyword">delete</span> temp;</div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>--;</div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;        }</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;            <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a99867cc01e1b86376552700aafa194a6">_retireMinimum</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;    }</div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;</div>
<div class="line"><a name="l00714"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">  714</a></span>&#160;    <span class="keywordtype">int</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">Dictionnaire::_ajusterHauteur</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;    {</div>
<div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;        <span class="keywordflow">if</span>(n == NULL)</div>
<div class="line"><a name="l00717"></a><span class="lineno">  717</span>&#160;            <span class="keywordflow">return</span> -1;</div>
<div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;            n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a> = 1 + max(<a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">_ajusterHauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>), <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">_ajusterHauteur</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>));</div>
<div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;        <span class="keywordflow">return</span> n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">hauteur</a>;</div>
<div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;    }</div>
<div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;</div>
<div class="line"><a name="l00731"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">  731</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">Dictionnaire::_auxAppartient</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n, <span class="keyword">const</span> <span class="keywordtype">string</span>&amp; mot)<span class="keyword"> const</span></div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;<span class="keyword">    </span>{</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;        <span class="keywordflow">if</span>(n == NULL)</div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;        <span class="keywordflow">else</span> <span class="keywordflow">if</span> (n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">mot</a> == mot)</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;            <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">_auxAppartient</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>, mot) || <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">_auxAppartient</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>, mot);</div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;    }</div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;</div>
<div class="line"><a name="l00746"></a><span class="lineno"><a class="line" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">  746</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">Dictionnaire::_detruire</a>(<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">elem</a>&amp; n)</div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;    {</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;        <span class="keywordflow">if</span>(n == 0)</div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;            <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">_detruire</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a>);</div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">_detruire</a>(n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a>);</div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">gauche</a> = 0;</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;        n-&gt;<a class="code" href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">droite</a> = 0;</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        <span class="keyword">delete</span> n;</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;        <a class="code" href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">cpt</a>--;</div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        n = 0;</div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;    }</div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;</div>
<div class="line"><a name="l00766"></a><span class="lineno"><a class="line" href="namespace_t_p2_p1.html#a5d43fdfa11a86d28cc7806df9338cb1b">  766</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="namespace_t_p2_p1.html#a5d43fdfa11a86d28cc7806df9338cb1b">charSpecial</a>(<span class="keywordtype">char</span> c)</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;    {</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;        <span class="keywordflow">return</span> c == <span class="charliteral">&#39;(&#39;</span> || c == <span class="charliteral">&#39;[&#39;</span> || c == <span class="charliteral">&#39;,&#39;</span> || c == <span class="charliteral">&#39;;&#39;</span> || c == <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;    }</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;} <span class="comment">//Fin du namespace</span></div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;</div>
<div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;</div>
<div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;</div>
<div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;</div>
<div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;</div>
<div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;</div>
<div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;</div>
<div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;</div>
<div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;</div>
<div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;</div>
<div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;</div>
<div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;</div>
<div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;</div>
<div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;</div>
<div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;</div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html_a70f0d8ddd111a92cdfa3b5a3eb39ac60"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a70f0d8ddd111a92cdfa3b5a3eb39ac60">TP2P1::Dictionnaire::NoeudDictionnaire::droite</a></div><div class="ttdeci">NoeudDictionnaire * droite</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00161">Dictionnaire.h:161</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html_a90b379fa7613c31f893aff38557f9160"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a90b379fa7613c31f893aff38557f9160">TP2P1::Dictionnaire::NoeudDictionnaire::traductions</a></div><div class="ttdeci">std::vector&lt; std::string &gt; traductions</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00157">Dictionnaire.h:157</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_af2e2306884142c0b9049757fce52e030"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#af2e2306884142c0b9049757fce52e030">TP2P1::Dictionnaire::_auxTraduit</a></div><div class="ttdeci">void _auxTraduit(elem courant, const std::string &amp;mot, std::vector&lt; std::string &gt; &amp;traduction)</div><div class="ttdoc">mÃ©thode auxiliaire rÃ©cursive pour trouver la traduction d&#39;un mot. </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00291">Dictionnaire.cpp:291</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a8581528413efd6d84ce02664d628958a"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a8581528413efd6d84ce02664d628958a">TP2P1::Dictionnaire::afficherSymetrique</a></div><div class="ttdeci">void afficherSymetrique() const </div><div class="ttdoc">mÃ©thode pour afficher les mots du dictionnaire en ordre alphabÃ©tique en console ...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00175">Dictionnaire.cpp:175</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a6c2d734a2e60d29a3a964065690ae4e0"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a6c2d734a2e60d29a3a964065690ae4e0">TP2P1::Dictionnaire::_auxSupprimeMot</a></div><div class="ttdeci">bool _auxSupprimeMot(elem &amp;, const std::string &amp;)</div><div class="ttdoc">mÃ©thode auxiliaire Ã  la mÃ©thode supprimeMot. </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00522">Dictionnaire.cpp:522</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a2f8cd5406c909e9a15fe49cd0099b189"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a2f8cd5406c909e9a15fe49cd0099b189">TP2P1::Dictionnaire::_auxAfficherSymetrique</a></div><div class="ttdeci">void _auxAfficherSymetrique(elem) const </div><div class="ttdoc">mÃ©thode pour afficher les mots du dictionnaire en ordre symÃ©trique </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00653">Dictionnaire.cpp:653</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_aa155389006a16d1932bfa9ac321019fd"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#aa155389006a16d1932bfa9ac321019fd">TP2P1::Dictionnaire::_zigZigDroit</a></div><div class="ttdeci">void _zigZigDroit(elem &amp;)</div><div class="ttdoc">mÃ©thode pour faire une rotation droite Ã  partir du noeud donnÃ© en argument </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00616">Dictionnaire.cpp:616</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a1fac45a536b034e0f9c18600159bfae4"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a1fac45a536b034e0f9c18600159bfae4">TP2P1::Dictionnaire::Dictionnaire</a></div><div class="ttdeci">Dictionnaire()</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00023">Dictionnaire.cpp:23</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a6de74fa6b41e3895e24a2c152a14ddb9"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a6de74fa6b41e3895e24a2c152a14ddb9">TP2P1::Dictionnaire::_auxAjoutSuggestion</a></div><div class="ttdeci">void _auxAjoutSuggestion(std::vector&lt; std::pair&lt; std::string, double &gt; &gt; &amp;suggestions, std::string motAAjouter, double similarite, double &amp;minCourantSuggestions)</div><div class="ttdoc">mÃ©thode qui ajoute une suggestion au vecteur auxSuggestion </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00395">Dictionnaire.cpp:395</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_afec31f16e68dbf1d5b690a0f4a8fc76c"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#afec31f16e68dbf1d5b690a0f4a8fc76c">TP2P1::Dictionnaire::estVide</a></div><div class="ttdeci">bool estVide() const </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00167">Dictionnaire.cpp:167</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html_a382d9ca7b9bdacbaffba58a554c6b0e4"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a382d9ca7b9bdacbaffba58a554c6b0e4">TP2P1::Dictionnaire::NoeudDictionnaire::hauteur</a></div><div class="ttdeci">int hauteur</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00163">Dictionnaire.h:163</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_aa6bd888a66a1952a13839c08dfdae2a9"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#aa6bd888a66a1952a13839c08dfdae2a9">TP2P1::Dictionnaire::_noeudMinimum</a></div><div class="ttdeci">elem &amp; _noeudMinimum(elem &amp;)</div><div class="ttdoc">permet de rÃ©cupÃ©rer le noeud minimum du sous-arbre dont la racine est le noeud passÃ© en argument...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00677">Dictionnaire.cpp:677</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html">TP2P1::Dictionnaire::NoeudDictionnaire</a></div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00151">Dictionnaire.h:151</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a971428395744db051fa407e67f3584c2"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a971428395744db051fa407e67f3584c2">TP2P1::Dictionnaire::_detruire</a></div><div class="ttdeci">void _detruire(elem &amp;)</div><div class="ttdoc">permet de proprement libÃ©rer la mÃ©moire pour tous les noeuds de l&#39;arbre </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00746">Dictionnaire.cpp:746</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a1aad11c095493f83e49d2c71c4180fb6"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a1aad11c095493f83e49d2c71c4180fb6">TP2P1::Dictionnaire::_zigZigGauche</a></div><div class="ttdeci">void _zigZigGauche(elem &amp;)</div><div class="ttdoc">mÃ©thode pour faire une rotation gauche Ã  partir du noeud donnÃ© en argument </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00601">Dictionnaire.cpp:601</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a92dd97349bf16b37d1af70f8f0c146dd"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a92dd97349bf16b37d1af70f8f0c146dd">TP2P1::Dictionnaire::_ajusterHauteur</a></div><div class="ttdeci">int _ajusterHauteur(elem &amp;)</div><div class="ttdoc">mÃ©thode permettant d&#39;ajuster la hauteur de tous les noeuds de l&#39;arbre dont la racine est le noeud pa...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00714">Dictionnaire.cpp:714</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_ac03fb6c0c88bca2d5864f2d7bcd4f429"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#ac03fb6c0c88bca2d5864f2d7bcd4f429">TP2P1::Dictionnaire::_balancer</a></div><div class="ttdeci">void _balancer(elem &amp;)</div><div class="ttdoc">mÃ©thode utilitaire pour balancer l&#39;arbre </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00568">Dictionnaire.cpp:568</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html_a0b8a819e5a1e10b91673176eb164506e"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a0b8a819e5a1e10b91673176eb164506e">TP2P1::Dictionnaire::NoeudDictionnaire::mot</a></div><div class="ttdeci">std::string mot</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00155">Dictionnaire.h:155</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a99867cc01e1b86376552700aafa194a6"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a99867cc01e1b86376552700aafa194a6">TP2P1::Dictionnaire::_retireMinimum</a></div><div class="ttdeci">void _retireMinimum(elem &amp;)</div><div class="ttdoc">permet de supprimer le noeud minimum du sous-arbre dont la racine est le noeud passÃ© en argument...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00690">Dictionnaire.cpp:690</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_aa66dde8b809032a749e4aa51b1c3801f"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#aa66dde8b809032a749e4aa51b1c3801f">TP2P1::Dictionnaire::_auxAppartient</a></div><div class="ttdeci">bool _auxAppartient(elem &amp;, const std::string &amp;) const </div><div class="ttdoc">mÃ©thode auxiliaire Ã  la mÃ©thode appartient, permet de savoir si un mot est dans le dictionnaire ...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00731">Dictionnaire.cpp:731</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_ab8f2a691b729b54115cd40256aa2ec00"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#ab8f2a691b729b54115cd40256aa2ec00">TP2P1::Dictionnaire::~Dictionnaire</a></div><div class="ttdeci">~Dictionnaire()</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00109">Dictionnaire.cpp:109</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_ac7f8032259d37dbcf30d882961d72b16"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#ac7f8032259d37dbcf30d882961d72b16">TP2P1::Dictionnaire::racine</a></div><div class="ttdeci">elem racine</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00172">Dictionnaire.h:172</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_aecfb98d1a69ab5a3adb9e6e649d46b9d"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#aecfb98d1a69ab5a3adb9e6e649d46b9d">TP2P1::Dictionnaire::suggereCorrections</a></div><div class="ttdeci">std::vector&lt; std::string &gt; suggereCorrections(const std::string &amp;motMalEcrit)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00337">Dictionnaire.cpp:337</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_acc8506e31ea041e6b5de77cb9c2efec8"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#acc8506e31ea041e6b5de77cb9c2efec8">TP2P1::Dictionnaire::appartient</a></div><div class="ttdeci">bool appartient(const std::string &amp;data)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00158">Dictionnaire.cpp:158</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_af4cf77af93bdf56417c4145d3d4579c8"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#af4cf77af93bdf56417c4145d3d4579c8">TP2P1::Dictionnaire::_auxSuggereCorrections</a></div><div class="ttdeci">void _auxSuggereCorrections(elem courant, std::vector&lt; std::pair&lt; std::string, double &gt; &gt; &amp;suggestions, const std::string &amp;motMalEcrit, double &amp;minCourantSuggestions)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00361">Dictionnaire.cpp:361</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a2da68fe1c700505208e4247285df570c"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a2da68fe1c700505208e4247285df570c">TP2P1::Dictionnaire::_zigZagDroit</a></div><div class="ttdeci">void _zigZagDroit(elem &amp;)</div><div class="ttdoc">mÃ©thode pour faire une rotation gauche sur le noeud droit du noeud passÃ© en argument et ensuite une...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00642">Dictionnaire.cpp:642</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a0912cee29c757ad7ea3456c7ea6d3a0e"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a0912cee29c757ad7ea3456c7ea6d3a0e">TP2P1::Dictionnaire::traduit</a></div><div class="ttdeci">std::vector&lt; std::string &gt; traduit(const std::string &amp;mot)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00283">Dictionnaire.cpp:283</a></div></div>
<div class="ttc" id="_dictionnaire_8h_html"><div class="ttname"><a href="_dictionnaire_8h.html">Dictionnaire.h</a></div><div class="ttdoc">Ce fichier contient l&#39;interface d&#39;un dictionnaire. </div></div>
<div class="ttc" id="namespace_t_p2_p1_html_a5d43fdfa11a86d28cc7806df9338cb1b"><div class="ttname"><a href="namespace_t_p2_p1.html#a5d43fdfa11a86d28cc7806df9338cb1b">TP2P1::charSpecial</a></div><div class="ttdeci">bool charSpecial(char c)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00766">Dictionnaire.cpp:766</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire_html_a3d301732dce28d15a0a18c722ec716a9"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire_1_1_noeud_dictionnaire.html#a3d301732dce28d15a0a18c722ec716a9">TP2P1::Dictionnaire::NoeudDictionnaire::gauche</a></div><div class="ttdeci">NoeudDictionnaire * gauche</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00161">Dictionnaire.h:161</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a7940f1e1ba739407ef96130ba40dc7a7"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a7940f1e1ba739407ef96130ba40dc7a7">TP2P1::Dictionnaire::_hauteur</a></div><div class="ttdeci">int _hauteur(elem &amp;)</div><div class="ttdoc">mÃ©thode utilitaire pour avoir la hauteur d&#39;un noeud </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00558">Dictionnaire.cpp:558</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a4cd52bdf5bfaaea2eb7c814bd96ba8c8"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a4cd52bdf5bfaaea2eb7c814bd96ba8c8">TP2P1::Dictionnaire::similitude</a></div><div class="ttdeci">double similitude(const std::string &amp;mot1, const std::string &amp;mot2)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00185">Dictionnaire.cpp:185</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_ab1d56ee476bcb0d661ae5bbe1790618c"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#ab1d56ee476bcb0d661ae5bbe1790618c">TP2P1::Dictionnaire::_auxAjouteMot</a></div><div class="ttdeci">void _auxAjouteMot(elem &amp;, const std::string &amp;, const std::string &amp;)</div><div class="ttdoc">mÃ©thode auxiliaire Ã  la mÃ©thode ajouteMot. </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00484">Dictionnaire.cpp:484</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_addc784e06d941ed8ab530da2b02e72fe"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#addc784e06d941ed8ab530da2b02e72fe">TP2P1::Dictionnaire::supprimeMot</a></div><div class="ttdeci">void supprimeMot(const std::string &amp;motOriginal)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00139">Dictionnaire.cpp:139</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a2fe841290d727a217fb884825bb736b7"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a2fe841290d727a217fb884825bb736b7">TP2P1::Dictionnaire::ajouteMot</a></div><div class="ttdeci">void ajouteMot(const std::string &amp;motOriginal, const std::string &amp;motTraduit)</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00121">Dictionnaire.cpp:121</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a724750019b77473e549faf6bfd1f0e3c"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a724750019b77473e549faf6bfd1f0e3c">TP2P1::Dictionnaire::_zigZagGauche</a></div><div class="ttdeci">void _zigZagGauche(elem &amp;)</div><div class="ttdoc">mÃ©thode pour faire une rotation droite sur le noeud gauche du noeud passÃ© en argument et ensuite un...</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00631">Dictionnaire.cpp:631</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a65a771c9a6043f19629d07a0e21b22e7"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a65a771c9a6043f19629d07a0e21b22e7">TP2P1::Dictionnaire::nombreDeMot</a></div><div class="ttdeci">int nombreDeMot() const </div><div class="ttdoc">renvoie le nombre de mots dans le dictionnaire </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00472">Dictionnaire.cpp:472</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_a5112543f520ef0c74cf083aea00e7b23"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#a5112543f520ef0c74cf083aea00e7b23">TP2P1::Dictionnaire::cpt</a></div><div class="ttdeci">int cpt</div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8h_source.html#l00174">Dictionnaire.h:174</a></div></div>
<div class="ttc" id="class_t_p2_p1_1_1_dictionnaire_html_aeb93f0b68de19b7cc63f692525aa3210"><div class="ttname"><a href="class_t_p2_p1_1_1_dictionnaire.html#aeb93f0b68de19b7cc63f692525aa3210">TP2P1::Dictionnaire::_preparerSuggestions</a></div><div class="ttdeci">std::vector&lt; std::string &gt; _preparerSuggestions(std::vector&lt; std::pair&lt; std::string, double &gt; &gt; &amp;auxSuggestions)</div><div class="ttdoc">courte description de la mÃ©thode </div><div class="ttdef"><b>Definition:</b> <a href="_dictionnaire_8cpp_source.html#l00455">Dictionnaire.cpp:455</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="_dictionnaire_8cpp.html">Dictionnaire.cpp</a></li>
    <li class="footer">Généré le Lundi 30 Juin 2014 21:11:42 pour TP2-Partie1Dictionnaire par
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
